import { TextEdit, Button } from "std-widgets.slint";
export component Example inherits Window {
    // width: 200px;
    // height: 50px;
    // preferred-width: 300px;
    // preferred-height: 50px;
    background: gray;
    property <int> counter: 0;
    HorizontalLayout {
        spacing: 10px;
        
        mesg := TextEdit {
            width: root.width/2;
            height: root.height;
            text:"show data";
        }

        btn:=Button {
            text: "Click me!";
            height: root.height;
            width: root.width/2-parent.spacing;
            clicked => {
                root.counter += 1;
                mesg.text = "Clicked!" + root.counter;
                debug(root.counter);
            }
        }
    }
}
